package com.example.huawei.system.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @TableName user_car
 */
@ApiModel("用户车辆信息实体类")
@TableName(value = "user_car")
@Data
public class UserCar implements Serializable {
    private static final long serialVersionUID = 1L;
    /**
     * 主键
     */
    @TableId
    @ApiModelProperty(value = "主键")
    private String id;
    /**
     * 创建时间
     */
    @ApiModelProperty(value = "主键")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;
    /**
     * 用户id
     */
    @ApiModelProperty(value = "用户id")
    private String userId;
    /**
     * 车辆id
     */
    @ApiModelProperty(value = "车辆id")
    private String carId;
    /**
     * 车辆名
     */
    @ApiModelProperty(value = "车辆名")
    private String carName;
    /**
     * 车辆图片
     */
    @ApiModelProperty(value = "车辆图片")
    private String imageUrl;
    /**
     * 车辆里程
     */
    @ApiModelProperty(value = "车辆里程")
    private BigDecimal carMileage;
    /**
     * 购车时间
     */
    @ApiModelProperty(value = "购车时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date buyCarTime;

    /**
     * 车龄
     */
    @ApiModelProperty(value = "车龄")
    @TableField(exist = false)
    private String carAge;
}
